package com.motionlog.model;

import android.os.Parcel;
import android.os.Parcelable;

public class Base implements Parcelable {

	public int id = -1;
	public String name;
	public String content;

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeInt(id);
		dest.writeString(name);
		dest.writeString(content);
	}

	public static final Parcelable.Creator<Base> CREATOR = new Creator<Base>() {
		@Override
		public Base[] newArray(int size) {
			return new Base[size];
		}

		@Override
		public Base createFromParcel(Parcel source) {
			Base base = new Base();
			base.id = source.readInt();
			base.name = source.readString();
			base.content = source.readString();
			return base;
		}
	};
}
